home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
jovept2.arc
/
STRNCPY.C
< prev
next >
Wrap
Text File
|
1985-05-30
|
512b
|
24 lines
/* strncpy.c */
/* JOVE/MSDOS. K. Mitchum 1/85 */
/* Ken Mitchum */
/* University of Pittsburgh */
/* Decision Systems Laboratory */
/* altered version for jove */
/* copy a string into a buffer n characters in length
*/
unsigned char *strncpy(to,from,n)
unsigned char *to,*from;
unsigned n;
{
unsigned char *cp;
for(cp=to;n && (*cp=*from++);n--,cp++);
while(n--)*cp++=0;
return to;
}